{extend name="template/base" /}
{block name="style"}
<style>
    .portfolio-area li.hover .textbox {
    display: block;
}
</style>
{/block}
{block name="content"}
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
    	<span class="l">
            <a href="javascript:;" onclick="del_forever_all('{:url(\'admin/goods.album/deleteforever_pic\')}')" class="btn btn-danger radius mr-5"><i class="Hui-iconfont"></i> 彻底删除</a>
        </span>
        <span class="r pt-5 pr-5">
            共有图片 ：<strong>{$list->total()}</strong> 张
        </span>
    </div>
    <div class="portfolio-content">
        {if(!empty($list))}
        <ul class="cl portfolio-area">
            {foreach($list as $key => $val)}
            <li class="item">
                <div class="portfoliobox">
                    <input class="checkbox" name="id[]" type="checkbox" value="{$val.apic_id}">
                    <div class="picbox"><a href="{$val.apic_cover|img_url}" data-lightbox="gallery" data-title="{$val.apic_name|default=''}"><img src="{$val.apic_cover|img_url}"></a></div>
                    <div class="textbox">{$val.apic_name|default=''}<br/>{$val.apic_spec|default=''}</div>
                </div>
            </li>
            {/foreach}
        </ul>
        {/if}
	</div>
    <div class="page-bootstrap" >{$list->render()}</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script>
    $(function () {
        $("[name='recommend'][value='{$vo.recommend==1 ? 1 : 0}']").attr("checked", true);
        $("[name='show_type'][value='{$vo.show_type==1 ? 1 : 0}']").attr("checked", true);
        if(parseInt($("[name='show_type']:checked").val()) == 0){
            $('#brand_pic').show();
        }
        $("[name='show_type']").change(function(){
            $('#brand_pic').toggle();
        });
        
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret) {
                ajax_progress(ret);
            }
        });
	$.Huihover(".portfolio-area li");
    })
</script>
{/block}